import { Configuation, defuatColor } from "../../shared"

export const Selector = 'sen-button'
export enum SizeConifg {
   small = 'small',
   medium = 'medium',
   large = 'large',
}
export enum TypeConifg {
   primary = 'primary',
   success ='success',
   info = 'info',
   warning = 'warning',
   danger = 'danger',
}
export const defaultConfig: Configuation = {
   defuatStyle: {
      width: 88,
      height: 44,
      borderRadius: 8,
      border: 'none',
      background: defuatColor.primary,
      fontSize: 14,
      textAlign: 'center',
      color: 'white',
      margin: 12
   },
   text: '默认按钮',
}
export const defualtSize = (size: SizeConifg) => {
  switch(size) {
    case SizeConifg.small:
      return {
         width: 72,
         height: 24,
         borderRadius: 4,
         fontSize: 12,
         lineHeight: 24,
      }
    case SizeConifg.medium:
      return {
         width: 128,
         height: 56,
         borderRadius: 16,
         fontSize: 16,
         lineHeight: 56,
      }
      case SizeConifg.large :
         return {
            width: 264,
            height: 60,
            borderRadius: 24,
            fontSize: 32,
            lineHeight: 60,
         }
    default:
      return {
         width: 88,
         height: 44,
         borderRadius: 8,
         fontSize: 14,
         lineHeight: 44,
      }
   }
}